<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <link rel="apple-touch-icon" sizes="76x76" href="{_INDEX_STATIC_}/moban/assets/img/apple-icon.png">
    <link rel="icon" type="image/png" href="{_INDEX_STATIC_}/moban/assets/img/favicon.png">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>首页 | {$system_name}</title>
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
        name='viewport' />
    <link href="{_INDEX_STATIC_}/moban/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="{_INDEX_STATIC_}/moban/assets/css/now-ui-kit.css?v=1.1.0" rel="stylesheet" />

</head>

<body class="index-page sidebar-collapse">

    <!-- 引入导航栏 -->
    {include file='public/header'}

    <div class="container">

        <!-- 轮播图 -->
        {if condition="$slideshow_info"}
        <div class="row ">
            <div class="col-md-12 justify-content-center">
                <div id="myCarousel" class="carousel slide" data-ride="carousel">
                    <ol class="carousel-indicators">
                        {volist name="slideshow_info" id="row" key="i"}
                        {if condition="$i == 1"}
                        <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                        {else /}
                        <li data-target="#myCarousel" data-slide-to="{$i-1}"></li>
                        {/if}
                        {/volist}
                    </ol>
                    <div class="carousel-inner" role="listbox" style="height: 400px;">
                        {volist name="slideshow_info" id="row" key="j"}
                        {if condition="$j == 1"}
                        <div class="carousel-item active">
                            <img class="d-block" src="/storage/{$row.img_path}" style="width: 100%;height: 400px;"
                                alt="First slide">
                            <div class="carousel-caption d-none d-md-block">
                                {if condition="$row.nid"}
                                <a href="{:url('index/notice')}?nid={$row.nid}" style="color: black;">
                                    <h5>{$row.title}</h5>
                                </a>
                                {else /}
                                <h5>{$row.title}</h5>
                                {/if}
                            </div>
                        </div>
                        {else /}
                        <div class="carousel-item">
                            <img class="d-block" src="/storage/{$row.img_path}" style="width: 100%;height: 400px;"
                                alt="First slide">
                            <div class="carousel-caption d-none d-md-block">
                                {if condition="$row.nid"}
                                <a href="{:url('index/notice')}?nid={$row.nid}" style="color: black;">
                                    <h5>{$row.title}</h5>
                                </a>
                                {else /}
                                <h5>{$row.title}</h5>
                                {/if}
                            </div>
                        </div>
                        {/if}
                        {/volist}
                    </div>
                    <a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
                        <i class="now-ui-icons arrows-1_minimal-left"></i>
                    </a>
                    <a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
                        <i class="now-ui-icons arrows-1_minimal-right"></i>
                    </a>
                </div>
            </div>
        </div>
        {/if}

        <!-- 标题列表 -->
        <div class="row ">
            <div class="col-md-12" style="margin-top: 20px;"></div>
            <!-- 标题列表 -->
            <div class="col-sm-8">
                <ul class="list-group">
                    <!-- <a href="{:url('index/notice_list')}">
                        <li class="list-group-item alert alert-info" style="text-align: right;">更多通知资讯</li>
                    </a> -->
                    {volist name="notice_list" id="row" key="i"}
                    <a href="{:url('index/notice')}?nid={$row.id}" style="text-decoration-color: black;">
                        <li class="list-group-item alert"
                            style="background-color: rgb(172, 184, 248);border-radius: 10px;font-size: 14px;">{$i}. {$row.title}</li>
                    </a>
                    {/volist}
                </ul>
            </div>
            <div class="col-sm-4">
                <ul class="list-group">
                    <a href="{:url('User/index')}" style="text-decoration-color: black;">
                        <li class="list-group-item alert bg-info" style="border-radius: 10px;">
                            个人信息
                        </li>
                    </a>
                    <a href="{:url('Index/notice_list')}" style="text-decoration-color: black;">
                        <li class="list-group-item alert bg-info" style="border-radius: 10px;">
                            更多资讯
                        </li>
                    </a>
                    <a href="{:url('Index/link')}" style="text-decoration-color: black;">
                        <li class="list-group-item alert bg-info" style="border-radius: 10px;">
                            友情链接
                        </li>
                    </a>
                </ul>
            </div>

        </div>

        <!-- 成果管理介绍 -->
        <div class="row" style="margin-top: 30px;">
            <div class="col-md-12">
                <div class="row">
                    <div class="col-md-6">
                        <div class="col-md" style="width: 580px; height: 350px">
                            <img src="{_INDEX_STATIC_}/img/index/1070.jpg_wh300.jpg" style="width: 100%;height: 100%;" />
                        </div>
                    </div>

                    <div class="col-md-6">
                        <h2>成果信息管理系统</h2>
                        <h5>
                            <p style="text-indent:2em;font: bold 26px 楷体">
                                作为一个单位每年年终总结的重要内容，各类成果的认证及统计工作往往繁杂而又冗长。
                                每位员工根据上级提供的表格和自身情况手工填写电子表格，逐层汇集到负责的相关部门，这一过程耗时而繁杂。表格收集完整后，专人进行分类、
                                统计、归档，工作量大，且无法快捷的进行追溯统计。成果信息管理系统应运而生，大大节省了人力物力， 方便员工使用，便于管理层统计和分析数据。
                            </p>
                        </h5>
                    </div>
                </div>

            </div>
        </div>

        <!-- 成果展示 -->
        <div class="row" style="border-radius: 20px ; margin-top: 30px;background-color: rgba(231, 223, 223, 0.205);">
            <div class="col-md-12">
                <!-- <h3>成果展示</h3> -->
                <div id="charts_data" style="display:none">{$achievement_analysis_res}</div>
            </div>
            <!-- 柱状图 -->
            <div class="col-md-6">
                <div id="charts_bar" style="width: 100%;height:400px;"></div>
            </div>
            <!-- 饼状图 -->
            <div class="col-md-6">
                <div id="charts_pie" style="width: 100%;height:400px;"></div>
            </div>
        </div>

        <!-- 友情链接 -->
        <div class="row" style="margin-top: 30px;min-height: 45px;">
            <div class="col-md-12">
                <style>
                    .link-a {
                        color: black;
                        text-decoration: none;
                    }

                    .link-a:hover {
                        color: white;
                        background-color: #aaa;
                        text-decoration: none;
                    }
                </style>
                <ul class="list-inline">
                    <li class="list-inline-item" style="padding: 3px;">友情链接: </li>
                    {volist name="index_link" id="row"}
                    <a class="link-a" href="{$row.url}" target="_blank">
                        <li class="list-inline-item" style="padding: 3px;">{$row.name}</li>
                    </a>
                    {/volist}
                </ul>
            </div>
        </div>

    </div>

    <!-- 引入页脚 -->
    {include file='public/footer'}
    <!-- 加载 echarts -->
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
    <!-- 加载 echarts JS -->
    <script src="{_INDEX_STATIC_}/index-echarts/myChart.js"></script>
    <script>
        var data = HTMLDecode($('#charts_data').html());
        data = JSON.parse(data);

        if (data != '') {
            // 柱状图
            var charts_bar = echarts.init(document.getElementById('charts_bar'));
            var option = myCharts.charts_bar('成果统计', '总量', data);
            charts_bar.setOption(option);

            // 饼状图
            var charts_pie = echarts.init(document.getElementById('charts_pie'));
            var option = myCharts.charts_pie('成果分布', '比例', data);
            charts_pie.setOption(option);
        }

        // 转义字符
        function HTMLDecode(text) {
            var temp = document.createElement("div");
            temp.innerHTML = text;
            var output = temp.innerText || temp.textContent;
            temp = null;
            return output;
        }
    </script>
</body>

</html>